import request from "@/utils/request";

const USER_BASE_URL = "/core/vehicle";

const vehicleMonitoringDataApi = {
  getVehicleMonitoring: (params: VehicleMonitoringDataQuery) => {
    let query = encodeURIComponent(JSON.stringify(params));
    return request<any, any>({
      url: `${USER_BASE_URL}/info/query?object=${query}`,
      method: "get",
    });
  },
};
export default vehicleMonitoringDataApi;

export interface VehicleMonitoringData {
  /**
   * ID
   */
  id: number;
  /**
   * 车牌号
   */
  licensePlate: string;
  /**
   * 当前位置
   */
  currentLocation: string;
  /**
   * 经纬度数组
   */
  coordinates: string;
  /**
   * 监控状态
   */
  monitorStatus: string;
  /**
   * 锁状态
   */
  lockStatus: number;
  /**
   * 温度
   */
  temperature: number;
  /**
   * 持续时间
   */
  duration: string;
  /**
   * 车速
   */
  speed: number;
}
export interface VehicleMonitoringDataQuery extends PageQuery {
  /**
   * 车牌号
   */
  licensePlate?: string;
  /**
   * 监控状态
   */
  monitorStatus?: string;
  /**
   * 锁状态
   */
  lockStatus?: string;
}
